package com.campus.counseling.enums;

import com.baomidou.mybatisplus.annotation.EnumValue;
import com.fasterxml.jackson.annotation.JsonValue;

/**
 * 心理健康预警等级枚举
 */
public enum WarningLevel {
    LOW("LOW", "低风险"),
    MEDIUM("MEDIUM", "中等风险"),
    HIGH("HIGH", "高风险");
    
    @EnumValue  // 标记数据库存储的值
    private final String code;
    private final String description;
    
    WarningLevel(String code, String description) {
        this.code = code;
        this.description = description;
    }
    
    @JsonValue  // 标记JSON序列化时使用的值
    public String getCode() {
        return code;
    }
    
    public String getDescription() {
        return description;
    }
    
    @Override
    public String toString() {
        return code;
    }
} 